// vim: foldmethod=marker : foldmarker=<<<,>>>
/*
 File: bootstrap.c
 Product: <product>
 Creating date: 20/03/2007 22:43
 Remark: 
*/
#include "hooverPch.h"

#include <windows.h>

#include "lite/lite.h"
#include "hoover/rod.h"

int WINAPI WinMain(HINSTANCE instance, HINSTANCE unused0, LPWSTR command, int showMode) {
 hoover_rod_p rod; MSG m;
 singletonify__hoover_rod();

 PostMessage(0,CREATE__hoover_rod,0,0);
 while(GetMessage(&m,0,0,0)) {
  switch (m.message) {
  case CREATE__hoover_rod:
   rod=create__hoover_rod(instance); 
   if (rod==NULL) { PostQuitMessage(0); break; }
   if (!constructAndNavigate__hoover_rod(rod,showMode)) 
    { PostMessage(0,DEMOLISH__hoover_rod,0,0); break; }
   break;
  case DEMOLISH__hoover_rod: 
   demolish__hoover_rod(rod); rod=NULL;
   PostQuitMessage(0);
   break;
  default:
   TranslateMessage(&m);
   DispatchMessage(&m);
   };
  };

 return 0;
 };

/*
{
 WCHAR txt[128];
 swprintf(txt,L"Page nis %p.",GetWindowLong(h,GWL_USERDATA));
 MessageBox(0,txt,L"Info!",MB_SETFOREGROUND);
};
*/

